From d6f701f209c092bf0f514d444efeba86301d154f Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 3 Aug 2006 20:42:13 +0000 Subject: [PATCH] Zero struct tm on timestamp read so if time tag is malformed, we don't have hour number 17347896 or whatever else happened to be there. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@2281 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/gpx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gpsbabel/gpx.c b/gpsbabel/gpx.c index b6bbdfe13..07f3ecdd6 100644 --- a/gpsbabel/gpx.c +++ b/gpsbabel/gpx.c @@ -735,6 +735,8 @@ xml_parse_time( const char *cdatastr ) struct tm tm; time_t rv = 0; char *timestr = xstrdup( cdatastr ); + + memset(&tm, 0, sizeof(tm)); offsetstr = strchr( timestr, 'Z' ); if ( offsetstr ) { -- 2.30.2